<div class="main-content">
    <h1><a name="API (Individual)"></a>API (Individual)</h1>

            <hr/>
            <h4 class="operation-heading"><a name="exportApiGet"></a>Export an API</h4> <code>GET https://apis.wso2.com/api/am/admin/v0.16/export/api</code>
            <p class="marked"></p>

            <p class="marked">This operation can be used to export the details of a particular API as a zip file.
</p>

            <h4 class="section-heading">OAuth 2.0 Scope</h4>
                <p>Not required</p>

            <h4 class="section-heading">
                Examples
            </h4>

            <h4 class="section-heading" id="scroll-to">Parameters</h4>
            <table class="table table-hover">
                <colgroup>
                    <col style="width: 10%;"/>
                    <col style="width: 20%;"/>
                    <col style="width: 40%;"/>
                    <col style="width: 10%;"/>
                    <col style="width: 20%;"/>
                </colgroup>
                <thead>
                <tr class="active">
                    <th>Type</th>
                    <th>Name</th>
                    <th>Description</th>
                    <th>Schema</th>
                    <th>Default</th>
                </tr>
                </thead>
                    <tr>
                        <td class="parameter">
                            
                            <span class="param-in">Query </span>
                            
                            
                            
                        </td>
                        <td class="param-name">
                            <p>name</p>
                            <p class="param-required">
                                required
                                
                            </p>
                        </td>
                        <td>
                            <p class="param-description marked">API Name
</p>
                        </td>
                        <td>
                            <span class="param-type">
                                String
                            </span>
                        </td>
                        <td>
                            <p class="marked"></p>
                        </td>
                    </tr>
                    <tr>
                        <td class="parameter">
                            
                            <span class="param-in">Query </span>
                            
                            
                            
                        </td>
                        <td class="param-name">
                            <p>version</p>
                            <p class="param-required">
                                required
                                
                            </p>
                        </td>
                        <td>
                            <p class="param-description marked">Version of the API
</p>
                        </td>
                        <td>
                            <span class="param-type">
                                String
                            </span>
                        </td>
                        <td>
                            <p class="marked"></p>
                        </td>
                    </tr>
                    <tr>
                        <td class="parameter">
                            
                            <span class="param-in">Query </span>
                            
                            
                            
                        </td>
                        <td class="param-name">
                            <p>providerName</p>
                            <p class="param-required">
                                required
                                
                            </p>
                        </td>
                        <td>
                            <p class="param-description marked">Provider name of the API
</p>
                        </td>
                        <td>
                            <span class="param-type">
                                String
                            </span>
                        </td>
                        <td>
                            <p class="marked"></p>
                        </td>
                    </tr>
                    <tr>
                        <td class="parameter">
                            
                            <span class="param-in">Query </span>
                            
                            
                            
                        </td>
                        <td class="param-name">
                            <p>format</p>
                            <p class="param-required">
                                required
                                
                            </p>
                        </td>
                        <td>
                            <p class="param-description marked">Format of output documents. Can be YAML or JSON.
</p>
                                <p><b>Accepted values: </b></p>

<code>JSON</code>

<code>YAML</code>

                        </td>
                        <td>
                            <span class="param-type">
                                String
                            </span>
                        </td>
                        <td>
                            <p class="marked"></p>
                        </td>
                    </tr>
                    <tr>
                        <td class="parameter">
                            
                            <span class="param-in">Query </span>
                            
                            
                            
                        </td>
                        <td class="param-name">
                            <p>preserveStatus</p>
                            <p class="param-required">
                                
                                optional
                            </p>
                        </td>
                        <td>
                            <p class="param-description marked">Preserve API Status on export
</p>
                        </td>
                        <td>
                            <span class="param-type">
                                Boolean
                            </span>
                        </td>
                        <td>
                            <p class="marked"></p>
                        </td>
                    </tr>
            </table>

            <h4 class="section-heading">Responses</h4>

            <table class="table table-hover">
                <colgroup>
                    <col style="width: 15%;"/>
                    <col style="width: 70%;"/>
                    <col style="width: 15%;"/>
                </colgroup>
                <thead>
                <tr class="active">
                    <th>HTTP Code</th>
                    <th>Description</th>
                    <th>Schema</th>
                </tr>
                </thead>
                <tbody>
                    <tr>
                        <td class="parameter"><p class="marked">200</p></td>
                        <td class="parameter"><p class="marked">OK. Export Successful. </p></td>
                        <td class="parameter">
                            <span class="parameter">
                                    <a href="#!/models#file">file</a>
                            </span>
                        </td>
                    </tr>
                    <tr>
                        <td class="parameter"><p class="marked">404</p></td>
                        <td class="parameter"><p class="marked">Not Found. Requested API does not exist. </p></td>
                        <td class="parameter">
                            <span class="parameter">
                                    <a href="#!/models#Error">Error</a>
                            </span>
                        </td>
                    </tr>
                    <tr>
                        <td class="parameter"><p class="marked">500</p></td>
                        <td class="parameter"><p class="marked">Internal Server Error. Error in exporting API. </p></td>
                        <td class="parameter">
                            <span class="parameter">
                                    <a href="#!/models#Error">Error</a>
                            </span>
                        </td>
                    </tr>
                </tbody>
            </table>
            <hr/>
            <h4 class="operation-heading"><a name="importApiPost"></a>Import an API</h4> <code>POST https://apis.wso2.com/api/am/admin/v0.16/import/api</code>
            <p class="marked"></p>

            <p class="marked">This operation can be used to import an API.
</p>

            <h4 class="section-heading">OAuth 2.0 Scope</h4>
                <p>Not required</p>

            <h4 class="section-heading">
                Examples
            </h4>

            <h4 class="section-heading" id="scroll-to">Parameters</h4>
            <table class="table table-hover">
                <colgroup>
                    <col style="width: 10%;"/>
                    <col style="width: 20%;"/>
                    <col style="width: 40%;"/>
                    <col style="width: 10%;"/>
                    <col style="width: 20%;"/>
                </colgroup>
                <thead>
                <tr class="active">
                    <th>Type</th>
                    <th>Name</th>
                    <th>Description</th>
                    <th>Schema</th>
                    <th>Default</th>
                </tr>
                </thead>
                    <tr>
                        <td class="parameter">
                            <span class="param-in">Form </span>
                            
                            
                            
                            
                        </td>
                        <td class="param-name">
                            <p>file</p>
                            <p class="param-required">
                                required
                                
                            </p>
                        </td>
                        <td>
                            <p class="param-description marked">Zip archive consisting on exported api configuration
</p>
                        </td>
                        <td>
                            <span class="param-type">
                                File
                            </span>
                        </td>
                        <td>
                            <p class="marked"></p>
                        </td>
                    </tr>
                    <tr>
                        <td class="parameter">
                            
                            <span class="param-in">Query </span>
                            
                            
                            
                        </td>
                        <td class="param-name">
                            <p>preserveProvider</p>
                            <p class="param-required">
                                
                                optional
                            </p>
                        </td>
                        <td>
                            <p class="param-description marked">Preserve Original Provider of the API. This is the user choice to keep or replace the API provider.
</p>
                        </td>
                        <td>
                            <span class="param-type">
                                Boolean
                            </span>
                        </td>
                        <td>
                            <p class="marked"></p>
                        </td>
                    </tr>
                    <tr>
                        <td class="parameter">
                            
                            <span class="param-in">Query </span>
                            
                            
                            
                        </td>
                        <td class="param-name">
                            <p>overwrite</p>
                            <p class="param-required">
                                
                                optional
                            </p>
                        </td>
                        <td>
                            <p class="param-description marked">Whether to update the API or not. This is used when updating already existing APIs.
</p>
                        </td>
                        <td>
                            <span class="param-type">
                                Boolean
                            </span>
                        </td>
                        <td>
                            <p class="marked"></p>
                        </td>
                    </tr>
            </table>

            <h4 class="section-heading">Responses</h4>

            <table class="table table-hover">
                <colgroup>
                    <col style="width: 15%;"/>
                    <col style="width: 70%;"/>
                    <col style="width: 15%;"/>
                </colgroup>
                <thead>
                <tr class="active">
                    <th>HTTP Code</th>
                    <th>Description</th>
                    <th>Schema</th>
                </tr>
                </thead>
                <tbody>
                    <tr>
                        <td class="parameter"><p class="marked">200</p></td>
                        <td class="parameter"><p class="marked">Created. API Imported Successfully. </p></td>
                        <td class="parameter">
                            <span class="parameter">
                                    
                            </span>
                        </td>
                    </tr>
                    <tr>
                        <td class="parameter"><p class="marked">403</p></td>
                        <td class="parameter"><p class="marked">Forbidden Not Authorized to import. </p></td>
                        <td class="parameter">
                            <span class="parameter">
                                    <a href="#!/models#Error">Error</a>
                            </span>
                        </td>
                    </tr>
                    <tr>
                        <td class="parameter"><p class="marked">404</p></td>
                        <td class="parameter"><p class="marked">Not Found. Requested API to update not found. </p></td>
                        <td class="parameter">
                            <span class="parameter">
                                    <a href="#!/models#Error">Error</a>
                            </span>
                        </td>
                    </tr>
                    <tr>
                        <td class="parameter"><p class="marked">409</p></td>
                        <td class="parameter"><p class="marked">Conflict. API to import already exists. </p></td>
                        <td class="parameter">
                            <span class="parameter">
                                    <a href="#!/models#Error">Error</a>
                            </span>
                        </td>
                    </tr>
                    <tr>
                        <td class="parameter"><p class="marked">500</p></td>
                        <td class="parameter"><p class="marked">Internal Server Error. Error in importing API. </p></td>
                        <td class="parameter">
                            <span class="parameter">
                                    <a href="#!/models#Error">Error</a>
                            </span>
                        </td>
                    </tr>
                </tbody>
            </table>
</div>
